import { createStore } from 'vuex'
import cretePersistedState from 'vuex-persistedstate'
//三个模块 
import cart from './modules/cart.js'
import category from './modules/category.js'
import user from './modules/user.js'
export default createStore({
  modules: {
    cart,
    category,
    user
  },
  plugins: [cretePersistedState({
    //本地名字
    key: 'erabit-client-pc-124-store',
    //指定需要存储的模块
    paths: ['user', 'cart']
  })]
})